<style>
    #configureQualification-detail {
        padding: 20px 25px 25px 0;
    }

    #configureQualification-detail span {
        margin: 0 0 2px 3px !important;
    }

    .layui-layer-page .layui-layer-content {
        overflow: visible !important;
    }
</style>
<div class="layui-fluid" id="configureQualification-detail">
    <form class="layui-form" lay-filter="configureQualification-detail-form">
        <div class="layui-form-item">
            <div class="layui-col-md6">
                <label class="layui-form-label website-form-item-require">课题分类：</label>
                <div class="layui-input-block">
                    <input type="text" name="levelTypeCode" readonly class="layui-input">
                </div>
            </div>
            <div class="layui-col-md6">
                <label class="layui-form-label">申报方式：</label>
                <div class="layui-input-block">
                    <input type="text" name="declarationMethodCode" readonly class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-col-md6">
                <label class="layui-form-label">职务：</label>
                <div class="layui-input-block">
                    <input type="text" name="positionTypeCode" readonly class="layui-input">
                </div>
            </div>
            <div class="layui-col-md6">
                <label class="layui-form-label">职称级别：</label>
                <div class="layui-input-block">
                    <input type="text" name="titleTypeCode" readonly class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">学历：</label>
                    <div class="layui-input-block">
                        <input type="text" name="degreeTypeCode" readonly class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">是否发布：</label>
                    <div class="layui-input-block">
                        <input type="text" name="isPublish" readonly class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label">最大年龄：</label>
                    <div class="layui-input-block">
                        <input type="text" name="maxAge" readonly class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label">最小年龄：</label>
                    <div class="layui-input-block">
                        <input type="text" name="minAge" readonly class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <label class="layui-form-label">项目进度：</label>
                <div class="layui-input-block">
                    <textarea name="projectSchedule" rows="5" class="layui-textarea"></textarea>
                </div>
            </div>
        </div>
    </form>
</div>

<script data-th-inline="javascript">
    layui.use(['form', 'formSelects','dict'], function () {
        var $ = layui.$,
            formSelects = layui.formSelects,
            dict = layui.dict,
            form = layui.form,
            configureQualification = [[${configureQualification}]];
        form.render();
        initExpertValue();
        formSelects.render();
        function initExpertValue() {
            let levelTypeCode = dict.getByCode(configureQualification.levelTypeCode);
            let positionTypeCode = dict.getByCode(configureQualification.positionTypeCode);
            let titleTypeCode = dict.getByCode(configureQualification.titleTypeCode);
            let degreeTypeCode = dict.getByCode(configureQualification.degreeTypeCode);


            let levelName = "";
            let declarationMethodName = "";
            let isPublishName = "";
            let positionTypeName = "";
            let titleName = "";
            let degreeName = "";

            if (levelTypeCode) {
                levelName = levelTypeCode.name;
            }
            if (configureQualification.declarationMethodCode=='0') {
                declarationMethodName = '个人';
            }else {
                declarationMethodName = '课题组';
            }
            if (configureQualification.isPublish) {
                isPublishName = '已发布';
            }else {
                isPublishName = '未发布';
            }
            if (positionTypeCode) {
                positionTypeName = positionTypeCode.name;
            }
            if (titleTypeCode) {
                titleName = titleTypeCode.name;
            }
            if (degreeTypeCode) {
                degreeName = degreeTypeCode.name;
            }
            form.val("configureQualification-detail-form", {
                "levelTypeCode": levelName,
                "declarationMethodCode": declarationMethodName,
                "positionTypeCode": positionTypeName,
                "titleTypeCode": titleName,
                "isPublish": isPublishName,
                "degreeTypeCode": degreeName,
                "maxAge": configureQualification.maxAge,
                "minAge": configureQualification.minAge,
                "projectSchedule": configureQualification.projectSchedule
            });
        }
    });
</script>